package cn.uyunsky.platform.taglib;

/**
 * @version 1.0
 * @author baiyh
 * @date 2012-3-4
 */
public class TextInputTag extends BaseInputTag {

	private static final long serialVersionUID = 1L;

	private static String STYLE_CLASS = "uyunsky_text";

	private String maxlength;

	public void setMaxlength(String maxlength) {
		this.maxlength = maxlength;
	}

	public TextInputTag() {
	}

	protected String prepareOtherClass() {
		return STYLE_CLASS;
	}

	protected void prepareOtherAttributes(StringBuffer results) {
		prepareAttribute(results, "type", "text");
		if (maxlength != null) {
			prepareAttribute(results, "maxlength", maxlength);
		}
	}
}
